//
//  BCUIImageViewEx.swift
//  NewXueBa
//
//  Created by Shine on 2019/6/19.
//  Copyright © 2019 jmxQAQ. All rights reserved.
//

import Foundation

extension UIImageView {
    //做旋转的动画
    func seekLoadingAnimation() {
        let animat = CABasicAnimation(keyPath: "transform.rotation")
        animat.fromValue = 0
        animat.toValue = Double.pi
        animat.duration = 1
        animat.repeatCount = MAXFLOAT
        animat.isRemovedOnCompletion = true
        self.layer.add(animat, forKey: nil)
    }
    
}

